<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);"
		action="<?php echo url('menus')?>" method="post">
		<input type="hidden" name="pageNum" value="1" /> <input type="hidden"
			name="numPerPage" value="<?php echo $pagination['numPerPage']?>" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td width="80">上级菜单：</td>
					<td width="150"><select class="combox" name="parentid">
							<option value="0">所有菜单</option>
							<?php echo Menus::_get_menus_tree('<option value="{value}" {selected}>{title}</option>',0,$data['context']->parentid)?>
					</select></td>
				</tr>
				<tr>
					<td colspan="10"><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">搜 索</button>
							</div>
						</div></td>
				</tr>
			</table>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?php echo url('menus/add')?>" mask="true"
				height="400" target="dialog" title="菜单添加" reloadFlag='1'><span>添加</span>
			</a></li>
			<li><a class="edit"
				href="<?php echo url('menus/add/')?>?mid={menu_id}" mask="true"
				height="400" target="dialog"><span>修改</span> </a>
			</li>
			<li><a class="delete"
				href="<?php echo url('admin::menus/delete')?>?did={menu_id}"
				target="ajaxTodo" title="确定要删除吗?"><span>删除</span> </a>
			</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="143">
		<thead>
			<tr>
				<th width="50">ID</th>
				<th width="150">菜单名称</th>
				<th width="150">父级菜单</th>
				<th>链接地址?</th>
				<th width="50" align="center">后台?</th>
				<th width="50" align="center">显示?</th>
				<th width="50" align="center">排序</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<?php foreach ($data['fetch_data'] as $item):?>
			<tr target="menu_id" rel="<?php echo $item->id?>">
				<td><?php echo $item->id?></td>
				<td><?php echo $item->title?> <?php if (count($item->child)):?> <a
					href="<?php echo url('menus',array('parentid'=>$item->id))?>"
					target="navTab" title="查看下级菜单">(下级)</a> <?php endif;?>
				</td>
				<td><?php echo $item->parent->title?$item->parent->title:'--'?></td>
				<td><?php echo $item->isout?$item->url:($item->url?url($item->url):'--')?>
				</td>
				<td><?php echo $item->isback?'是':'否'?></td>
				<td><?php echo $item->display?'是':'否'?></td>
				<td><?php echo $item->order?></td>
				<td>--</td>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>每页显示</span> <select class="combox" name="numPerPage"
				change="navTabPageBreak" param="numPerPage">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select> <span>条，共<?php echo $pagination['totalCount']?>条</span>
		</div>
		<div class="pagination" targetType="navTab"
			totalCount="<?php echo $pagination['totalCount']?>"
			numPerPage="<?php echo $pagination['numPerPage']?>"
			pageNumShown="<?php echo $pagination['pageNumShown']?>"
			currentPage="<?php echo $pagination['currentPage']?>"></div>
	</div>
</div>
